< previous page page_238 next page >

Page 238
#define __RPC_FAR
But there's nothing after the word __RPC_FAR! Does that mean the term is defined as nothing? That's right. It's a constant that may be used on some platforms to instruct the compiler to generate certain types of code. But it is meaningless under Win32. So the compiler will simply discard the term during the compilation process.
The Visual Basic declaration for a GUID turns out to be the following simple structure:
Public Type GUID
   Data1 As Long    ' 32 bits
   Data2 As Integer ' 16 bits
   Data3 As Integer ' 16 bits
   Data4(7) As Byte ' 8 x 8 bits
End Type
Did you define Data4 correctly? Remember that the array is zero-based. If you defined it as Data4(8) As Byte, you would have 72 bits instead of 64.
What about CLSID and IID?
You can create identical structures for these types. But why bother? Since they all refer to 128-bit values, you can simply create a single user-defined type called GUID or CLSID and use it any time you need to deal with one of these universal identifiers. Puzzles 2628 use a structure named CLSID for this purpose.

 
< previous page page_238 next page >